import React from 'react';
import './BackTop.css'

const BackTop=(props)=>{
    const {display}=props;
    // const backTop=()=>{
    //     console.log('dianji');
    //     // console.log(document.body);
    //     document.body.scrollTop = document.documentElement.scrollTop = 0;
    //     console.log(document.body.scrollTop,document.documentElement.scrollTop);
    // }
    return(
        <>
        <div className="circle" onClick={()=>window.scrollTo(0,0)} style={display===0?{display:'none'}:{}}>
            <div className="arrow">
            </div>
        </div>
        </>
    )
}
export default BackTop;